package com.laoxu.java.ms.hystrix;

import com.laoxu.java.ms.model.User;
import com.laoxu.java.ms.service.UserClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @Author laoxu
 * @Date 2022/12/16 15:42
 * @Desc 用户服务接口失败策略
 */
@Slf4j
@Component
public class UserClientFallback implements UserClient {
    @Override
    public List<User> getUsers() {
        log.info("userclient getUsers接口调用失败，执行回退方法");
        return null;
    }

    @Override
    public User getUserById(Integer id) {
        log.info("userclient getUserById接口调用失败，执行回退方法");
        return null;
    }
}
